#！ /usr/bin/python3
# coding=UTF-8

from tkinter import *

def leftClick():
    pass

def leftClick2():
    pass

if __name__ == '__main__':
    root = Tk()
    root.title('单词翻译器')
    root['width']=250; root['height']=130
    Label(root, text='输入要翻译的内容',width=15).place(x=1,y=1)
    Entry1=Entry(root, width=20).place(x=110,y=1)

    Label(root, text='翻译结果：',width=18).place(x=1,y=20)
    s = StringVar().set('大家好，这是测试')
    Entry2= Entry(root, width=20,textvariable=s).place(x=110,y=20)

    Button1=Button(root, text='翻译',width=8).place(x=40,y=80)
    Button2=Button(root,text='清空',width=8).place(x=110,y=80)

    #绑定事件
    Button1.bind('<Button-1>', leftClick)
    Button2.bind('<Button-2>', leftClick2)

    root.mainloop()